Moved variable closer to function where it is used.