adjustments and bug fixes for grade management and other errors