added graceful handling of invalid or empty page searches