getting rid of loading after completing ajax call