Fixed semantic errors