bug fix from recent code changes