remove redundant error condition