fix internal bug