changed max lenth to keith wood's plugin