Fixed a few small bugs thanks to Anna and Ryan