Fixed bad code in client