Fixed fatal errors with invoice search.