It's all working fine except for the Info window popup - this only works on the second click of a record, the first click just returns the related records. I can see why this is happening but can't think of the best way to fix this, has anyone got any suggestions?