Fix a few minor problems that broke everything