Fixing eccentric elseif statement.