some adjustments to support compass implemention andlibrary changes