fixes DECAFS-32, and a memory leak