some more bug fixes.