Minor fixes for library support