A few small patches

A few small patches which should be pulled since I'm unlikely to have time to create any more significant patches soon.