loading gif working properly