Fixed validation when component is deleted