quick-n-dirty fix for #515