Moved createGUI down.