Bugfix when passing on errors