fixing wrong dependency order
removing useless if
Merge pull request #551 from nikit0z/ubuntu-3.2-WIP

fixing wrong dependency order