Fix fcost problems