Fix "'y_rep' not found" error

Sorry I broke it, it works now. Remember to `rm(list=ls())` before you test your app!