Fixed optimizer calculation -- UNDO THIS