Fixed bug in searchSingle