fix a bug of cart cal