Minor error fixes