More bug fixes that didn't make it because of the git add issue