fixes added for gradchecking