fix zero cost bug