some bugs are fixed