fix issue 37, make seed for optimizing get used