The parser can’t tell when you type “turn of” that you really mean “turn off” (i.e. the switching off action). It’s mapping that command to the turning action and the “of” to the only available object with the word “of” in it – the “pile of leaves.” If you want to guard against this, don’t name the object “pile of leaves,” just use that as the printed name property and create understand grammar to match:
Lab is a room.
The leaves are here. The printed name is "pile of leaves".
Understand "pile" and "pile of leaves" as the leaves.
As far as this:
I can’t tell without seeing the code for the crystal shard.