Fix erratic entity behaviour