Fixes logic error in detecting only hosts
Fixes logic error in detecting only hosts
Adds tests for new paramater option