obsolete code line causing bug