As to being else or elseif, in this case, is irrelevant, as the problem appears to be the alignment of the lines in reference to the corresponding original if statment.