Fix unbound local variable