IMAP Gmail messages going directly to Archive folder instead of inbox
Since upgrading to Mavericks, my Gmail accounts have been acting up in my Mac Mail program. At first it was just extremely slow to download the IMAP mail (my other POP email accounts continue to work just fine). However, in the past couple of days, I've noticed that incoming mail through the Gmail account randomly goes to my Inbox or to the Archive folder. This is very frustrating and can lead me to missing emails that I need to see. I haven't changed any settings in Gmail or in the Mac Mail program.
I have had no problems in continuing to recieve messages correctly on my iPad and iPhone, however.
Does anyone have any suggestions on how to fix this? I've found some information posted about this problem but there are multiple suggested "fixes" and I'm not sure which one(s) might really work and what possible negative impact they might have.
Any idea when Apple will have a fix for this?
Thanks.
MacBook Pro (15-inch Early 2011), OS X Mavericks (10.9)