Fixed a bug caused by double tapping to finish a line or polygon