fixes for etl scripts