Fixed leaks, per afs-bb https://github.com/valenok/mongoose/pull/161