New mouse algorithm +  script selector fix