Added a position check to speed up the line preview
Test