fixed double pop bug