bug fix for nested complex types