fix null generate contents
fix validation problems