fixed missing column name in sql