Fix some inconsistencies in cost calculation