finally fixed the error, always keep an eye on what variables are instantiated in a html partial