fix handling control messages