Com ports fail after sketch upload

Its usually just the first upload that works, it will then say comport is in use thereafter. If i unplug the usb cable and and replug it back in it will hang on upload. I have to wait 10 minutes before it will respond again. I have 2 usb cables so i just swap back and forth. I have also noticed that it will mess up the connection if i forget to hook up the connection to the board when i upload.