fixed entity clear bug