Fixed Pan Bug