Fixed missing locals declaration