followup fix to bugs from #298