Fixed minimum cost type issue.