bug fix for closing optativa with subject from it with classes opened