compilation fixes-extended patch