fix some bugs,ready for tomorrow