Improve usage of connect handlers and fix a possible reload issue