[FIX] context may be None, needs to be checked before accessed
[FIX] s/nsale/sale/