Partial fix for #704