fix: variable scope