Fixed bug 5502 + document + test