cleanup wx detection