minor fixes

*Fix "minimize" function