remove ref keyword, fix cli