fixed issue with flip mode