Fixes for library