Fixes for lib