fix bug for closed homeworks