fixed incorrect previous/next