Changes to vein detection logic