Fixed prevPage bug