fix some bugs :P