How long after having a baby does HCG stay in your system?

I had a baby 5 months ago and had a faint line on a pregnancy test that went away. Is it possible that this could be “leftover” HCG from my previous pregnancy? Or was it just a faulty test?