Fixed previous button not working