fix get level for switch widget