modify the source code for compatible