fixed some client side bugs