Immutable class fix for pgsql