Fix reset functionality