Changed message creation and updating conditions.