fixes potential memory leak identified in #2