bug 925520 - fix undesired closure, handle error case.

r=qDot