fixed bug in next/prev navigation
