update compass init script

Credit: CM