fixes for lib