fixed endless loop when no '--' is given