Fix invalid costs