gesture handling fixes