some minor error fixes