Rubbing

I set my TAC X S up correctly with the right pieces for my BMC bike. I went to clean it and I see the cog has been rubbing on the back. It took some of the paint off.

Has anyone else had a rubbing issue and how did you fix it?

Thanks