Trunk 4033

fix for [Trunk 4033] locking mechanism for encounter_type