fix crash on entity enum