bugfix var declaration