Fix an issue with handling costs