Fix bugs according to the focus test's feedback