Fixed bug with resetting.