Fixed data overwriting itself