Fix preview window does not open