modify the logic for WME usage
Merge pull request #1186 from huili2/diff_logic_WME_master

modify the logic for WME usage