attempt to fix postgresql incompatibility
second attempt at fixing postgre