Fixed a couple more bugs (hopefully)