fixed double jquery calls