fix a minor issue with my logic