Added some defensive errors in subgenerators.