Corrected the code that turns on/off the trimming of locations.