The masses given in periodic tables are weighted averages of all available isotopes not the actual mass.
The accurate mass of a proton is (1.0073 amu). The mass of a neutron is (1.0087 amu). The mass of C-13 is not 13 (13.0033548378 amu).
The isotopic abundances of C-12 and C-13 are 98.93% and 1.07%, respectively.
The atomic mass of carbon therefore is
(0.9893)(12 amu) + (0.0107)(13.00336) = 12.0107 amu