Fixed several errors on previous commit