Bug fix for newpin