Other small fix to optimizer