Client check - fixing a bug introduced by last commit

Used a javascript syntax code that doesn't work in all browsers.