Adding $timeout so that digest error is taken care of