Fix order of statements