Fixes

This PR solves:

https://github.com/KanoComputing/peldins/issues/1206
https://github.com/KanoComputing/peldins/issues/1225
 on_mode_changed is called at init