Fixes for stuff

Fixes #395 and a few other bugs. I KEEP FINDING BUGS.

:bug: