Fixed bug introduced by tighter pagination handling
Added missing import