document and test for bug