Fix a couple minor bugs