Removed unnecessary isOnPage