minor general error fixes