Fix range check for g_2dmode, isn't not a boolean