Some more bug fixes.