fix small bugs on client side