Fix WM check.