Fixed issues in library