on-device changes and fixes