Fix a bug induced in previous code cleanup