fixed some new introduced errors