Fix misplacement of previous and next buttons