fixing page boundaries on page flipping