fixed bug on pgReplication