Fix double call 'getPages' method