Fixed an issue with invoice events