hack to make this work for Redshift