Fixed loops and else if