fixed pg error