Fixed a few little bugs