Corrected handling of mode change
Merge branch 'openETCS/master'