fix old codes