Fixed clearing of touched flags.