fix crash when no pages found