Fix some gotchas