fixed bugs in client side js; fixed bug in chrome