Fix a bug with a suboptimal change until I think of something better.