Some fixes to resetting.