Removing unnecessary variable (and corresponding notice error)