fixed issue with pins > 9