bugfix: errors were not propagated correctly