Fix for Issue #31 and resolved another memory leak.