Modifying to hopefully fix for Arma 3 - this may not work for postgres.