exit on invalid window type