Fix bug with error and complete elements