Fixed if else on flip image