tests for #406
fix #406