fixed endless bug