made dynamic searches a bit more robust