flip image bug fix #39