Fix a few oversights

This partially reverts e0cb6bd46fb1d804ad6adea5688c844f7e1a0f6f