follow-up bug fixes for my earlier merge