Fix a local/global bug