fix can't pan bug