fix bugs on page turning