Hopefully fixes resetting problems, issue #1