fix bugs in carbon