Fixed Exception on connect