Arduino leonardo uploading board problem (Rx stuck on)

ive recently been starting to work with my arduino leonardo board, and everything was working well until i uploaded code for a sine wave generater i found online. the program started uploading, but never finished. i decided to try disconnecting and then reconnecting the device to try again, but it wont upload. the Rx led stays on whenever i connect the board to my pc via the usb connection. if i connect it to an external power supply instead, the Rx led doesnt light up. the board still give 5v and 3.3v in the designated pins, which seems to indicate that the chip isnt fried.

what exactly is wrong? how can i fix this problem?

FIXED THE PROBLEM--READ BELOW IF YOU HAVE THE SAME PROBLEM

for those who have the same problem, go to this thread and read the 2nd to last post posted by mellis.