Nexus 4 Charging Error

I was using my Nexus all day yesterday and by the time I got home I had 20% but when I plugged it in to charge it said charged (meaning 100-it was full). I unplugged the charger and plugged it back in and it still said 100%. I rebooted and it finally read 20% and started charging again. I was wondering if this is just a software error?