This resolves the issues but proves we need a callback on instruments.shutdown