Fixed prev bug