How do I fix the discrepancy in my return between the federal income and the provincial income?

I receive a T4A with amounts in box 028 and 020 plus a RL-1 with the total in box O code RM. I entered the information from the T4A and filled out the self-employed form as required for Quebec. But nothing matches and I keep having to fix my input.