fix obsolete code