Fixed pg error