fixed page loading error, when date or doc is changed