fixing a bug on initial reset()