Exception on UboundLocalError #37 fix