Hacks to fix some problems encountered in real-world use.