fix bug
small modifications