fixed error thrown when calling close()
0.1.3