Don't execute generation function when size are incorrect.