Fixed overflow on Redshift