fixed bug caused by lack of @ for local variable