Some more little bug fixes