Fix a critical bug