More trivial bug fixes