Added end to loading animation at better time