small fixes for next/prev