Fix: some code optimization

2 jobs for master in 6 minutes and 44 seconds
latest