fixes for pagination