add test for #378
Fixes #378
Merge remote-tracking branch 'origin/master'