fixed proper connection event