Change order of lines to prevent uninitialized constant error