fix js closure