prevent recursive ajax call