fix list length bug