fix for PostgreSQL