Fix the order of dependancies