fix bugs

so many bugs..