everything fine but prev button not working