Fixed a bug so the equalno is set to the correct value