sweet-lib: bug fixes