Quick fix to fix error not being send. Unit test to follow up.