Here are my fixes

I think I figured it out.