Fix some bug fixes.