update and fixed bug