fixed badCode