Created by: jnordberg
This fixes a bug that caused cli to fail when --target was specified with both hostname and port