bug fix from greg -- calling ubamem out of order can result in