fix flip js