Fixed a memory leak (Bjorn Van Tilt <bjorn.vantilt@gmail.com>)