Fixes from arm branch