bug fix: wrong string buffer length was used, documentation enhancements.