fix some warnings reported by AMO checker