fix bug
refact