fix a bound bug in dos