add max length. fixed #109