fixed previous and next issues