Fixed issue to ApplicationStateService and current document