More library fixes