fix pagination and hide menu on click