fixed an old bug regarding inputs having duplicate IDs