[lib] small improvements