more little bug fixes