better fix for #1253