Fixed ArrayIndexOverBounds -bug when point placed near screen edge.