Fixed inconsistent usage of elseif

In the past, elseif was used within templates. Now, you've mixed up the
usage of else if and elseif.