fix variable leaking. decided there are 1024 bytes in a Kb.