quick fix

Fixes the issue, global name 'ext' is not defined