Fixed the `getCurrentPage` method