Fix invalid entity mapping