Fixed some small obvious bugs