Fixed Several Compilation Errors