Fixed unnecessary ajax call