try to fix flip()