some fixes to pan span mode