Fix for nil tables at #1211

@Kartones , take a look. Is there any scenario where a result.name (a table) can be nil? I don't think so, but there've been some errors, and I guess that's because of previous problems.