fixed bug
fixed bug and clean up