Fixed a bug in IsStruct when using pknots