attempt to fix crash on using connect