debug some errors