Fix pagination and .js file