Fix #292 and other stuff.