fix some defects in data handler
fix some defects on client