fixed bug with prev button