fix invoice model issues