if stmt is nil, can't close without panic :(
Merge pull request #3 from NuVivo314/dev

Nice catch. Thank you.