Fix for potential Memory leak