fixed variable declaration error