Revert one change

I tested all combinations of if and else if and this one appears to give the best results.