Fix spin collision and improves tests