Fix a couple small bugs