Default S4 i9505 USB acting up

Hey, I've had this problem with my s4 since I bought it used, but it hasn't bothered me that much, but I'm just curious.
The USB isn't acting as it should be, when I connect it to the pc, it doesen't always work as storage the first try, I have to connect it twice sometimes, pc says not recocnized device, but when I reconnect, it works properly.
Also, it doesen't charge with the charger it came with, and doesen't work with most of the chargers, only works with Galaxy Tab 2 7.0 charger.
I usually charge it off USB on pc, because I don't have the Galaxy Tab available most of the time.
Is this something that can be fixed via software, or is it faulty?