fix: reorder hosts bug + test
Description
Bug related with hosts without data and index out of range
message fixed.
Test added.
Related issue
[give full link to the related issue]
Examples
[present examples for reviewers: new CLI output, screenshots, etc]
Edited by Anatoly Stansler