update docs and fix bug