fixed minor connection bug