fix for MULE-6955 and MULE-6956

Fix for MULE-6955 and  MULE-6956