tests for #327
fix #327