Fix order of definitions