fixed some client reqest handling code