Although this is an old question: Simply write the Key to VolatileMemory using KeyStructure.VolatileMemory instead of KeyStructure.NonVolatileMemory. Seems to be an old bug in the Sample.