fix two remotely triggerable memory leaks.
tested by jasper