fix all warnings for ARM, fix a few small bugs
Merge