Added test for #330 bug