corrected the repitition of popup