Fixed memory leak noted in #1. Thnx @resal81