Fixed bug in optimizer missing argument to instantiate