Fixed pan gesture bug