Fix double-mark bug when failing to init transparent connection