Hot and neutral terminals are switched in a outlet
First of all, you should never modify a plug by "switching terminals". So step 1: put the plug back to the original configuration. The problem here is seems to be in the receptacle, so fix the receptacle. 

You didn't say what type of receptacle you have; there are three types of 30A twist-lock receptacles:

  

Your statement about switching the terminals "and now it fits" seems to imply though that you maybe have the wrong receptacle? If neutral/ground were swapped, it would still physically fit, it just may not actually work (though chances are most things still would work, but there are safety reasons not to have neutral and hot backwards).

There are many types of NEMA receptacles:



If you have the wrong one, you need to install the correct one. For the most part, there are two considerations in switching:


The L14-* receptacles are combined 120/240V, so have 3 wires plus ground. You could cap off one and switch to a 2-wire receptacle, but you obviously can't go the other way without running a new wire. 
Moving to a same or lower-rated (amps) receptacle is okay, but moving to a higher-rated one may not be: it likely requires a larger gauge wire to be run. 


If you want more assistance, tell us what actual receptacle and plug you have (take pictures, if needed), tell us the wiring is, what the circuit breaker is rated for and if it's a 1- or 2-pole, and anything else that may be relevant.