bug fix and doc update