Fix for firefox pagination bug