Fixed a reference issue

Copy pasted the code