Fix bug when IDs are specified in CLI helper