Avoid exception on entity tracking