fixed issues with arm vs thumb mode