Bug fix and documentation correction