ITunes says my iPhone is over capacity but its not?

When I go to sync my Iphone to my macbook, a box pops up and tells me that I'm over capacity. However, the bar at the bottom says that I have free space remaining. And it won't let me sync my phone.

Format your phone then restore from backup