maybe a fix for entity crashing