Fix next/prev button issue