Support the closures in callbacks (see #21)