fixed reset functionality