Fix for line endpoints