Fix for #986 (broke in ad23ba0)
Merge branch 'fix986'