The closing braces have to go on the same line as the elseif. See CS