Fixing postgre compatibility