Fixing parent memory leak, see #18