fix random bugs due to code blindness