*8180* change column name in SQL
*8120* fix variable scope