Fixed Bugs in Nested Element CHecking