Grade calculation issue fixed