code compatibility fix