Fixed #45, Reference to free variable error