Attempt to fix postgres query on deploy