update classes and fixed dialog context bug