bug in client.js

bug which crash client app