fixed a bug in complextypes