Fixed a couple semantic errors