Fixed issue with id caching in closure.
Fixed issue with cb being invoked twice and more tests.