Found and fixed a bug