Fixed flipping, Lua doesn't have ternary of course.