Window closes if menu clicked