tests for #857