refine level check
Merge pull request #344 from licaiguo/fix-level-check

refine level check