Add some bug fixes.