small lib fixes