Fix for optimization run