added a fix to a bug in server code