Changing else if to elseif to fix syntax error