fixed bug in addgrade