some cleanups
fix wrongly initialized entity_ok