some bugs around optimist