Fix issue with not triggering auto-connect in some cases