Bug fixing: PHP and JS client