Fix reset (fixes #439)