Bug fixes for search by composition