Fix old code