internal variable bug correction