fixed some bugs 2