Fix for Memory leak