Fixed 0 terminate bug