Make a proper closure

Stupid python