fix some errors and update docs