fixed max size of library slots, close #1710