bugfix in error branch