fix monitor enter/leave
use bind instead of a closure
use bind instead of closures