Finally fixed PG error