Fixed elseif order