Change else if to elseif.

Fixed missing end problem