Fix a few things from when I made the changes

I had used an older version for my initial changes, this is a newer version.