fix bug in closure messing up cwrap (my fault)