fix for postgres