Added loading before deviceready.