fix bug in removing of unused code