fix some bugs from nowhere