some bugs fixed..