Bug fix on page flipper