fix bug with vertical page flipping