fix problem with error handling cell logic