Trying to fix ordering postgresql grr