Fix function not being removed
Report and suggested in #9 by @mbicknese
The binding context is incorrect hence its not being removed while calling end
Report and suggested in #9 by @mbicknese
The binding context is incorrect hence its not being removed while calling end