fixed the double pan of deterministic pan bug