modify the logic for WME usage
Merge pull request #1182 from huili2/diff_logic_WME

modify the logic for WME usage