Fixed tool mode issues
Merge branch 'dev' into ms