Fix memory leak. (Thanks to tapcio)