Fixed overwriting

I added everything that needed to be done, except these two lines. My
excuse: I had to eat.