Fix on certain WM conditions
Merge branch 'master2'