Fixed variable naming errors after onetomany rebasing