Fixed bug in invoice deletion