made the most obvious and quickest bug fixes

I'll work on the bigger changes tomorrow