fixed logic of was there a problem