fix prev and next