tests for #465
fix #465