Change the script to support dm9