Improve window handling after firefox crash