Improving the generator validation