fixed issue in generating problems