some error fixes