Fix "local variable 'options' referenced before assignment" error