check for result size of 0

sometimes the results are 0 size. in that case the hash lookup fails.