couple of bug fixes.