Search key fixes

merged with aventuralabs-master