Fixed EntitySensor overwriting the last line, messing up variables.