Fix bug with number of locals