Fixes for new library