correct one logic error