fixed a fex bugs