Add cost type logic.
Fix cost type.