minor bug fixes.