Encountering closure problem in Python. lol.
Fixed closure issue