Arduino IDE problems with COM ports with Galileo board

I'm beginning to use a Galileo board using the IDE version 1.5.3 that comes with the Galileo board. It seems to have a problem with the COM ports. It seems to get mixed up with which COM ports are open.. The symptom is that it never seems to 'forget' a COM port even when the device is disconnected. Worse, it seems to keep the ports open. The result is the ports get 'stuck' and I need to reboot my laptop in order to do the next the upload to the Galileo . By stuck I mean I get a 'permission denied' message in the IDE when i try to upload to the board. Any idea what might be causing this ? ... or what to do to clear the COM ports ? I'm running windows 7 64bit if that makes a difference. Thanks !