Fixing bug in vartype filter