fix old code