Fix error on entity death