Fixed a bug that has been in the code for 10 months