safer fix for #1