wmain fix