js fixes for google maps - bit messy still, but working