fix for pg::error