fix if else branch order b/c <select> has length