tests for #379
fix #379