Fixes complete.R, now correctly handles non-sequential input id's.