added tests for #287