Fix potential issue where next and previous pages are concurrently
loaded.