fixed bugs with resetting between sessions