fixes to library