fixed optimizeProjectDuration()