Fixed the usage of reset()