bugfix for error condition