better error output when invalid target is passed
fix options merging bug