more elegant reset handling