Fixed a few other small bugs