Reorders code to make it run properly.

Signed-off-by: Lochlin Duperron <LochlinDuperron@gmail.com>