Fix for postgres