Fix for entity damange casting error.