Fix the order of assignments