Fix $digest() race between perPage and numPages