You use two IF, so it looks like "if-1" and "if-2 or else" - thats why it works twice.
solution 1:
if ...
elseif ...
elseif ...
else ...

solution 2:
if ... goto end
if ... goto end
else ...
:end