actual adapter not found fix. 

the return line breaks if actual_adapter is not found. This happens when hosts is not an array.