Make sure position and length time doesn't overflow
Fixed bug in arrowpopup