more library fixes