Changed variable to local