Fix place of some functions