fix invoice errors