fixed double ajax call