fix bugs in close() and addPending()
bump version number