Fix the order of call functions