Bug fixes

Just a quick bug fix PR. Found a couple more things :)