### What problem does this PR solve? Fix entity_types. Close #6287 and #6608 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)