Fix a few things so it actually works.