Added error handling on invocations.