Fixed double firing of connect callback