trivial bug fixes