Fixed pagination not working before data loaded
Removed unnecessary lines