Bug fixing for double nested schemas