Fix bug + new function in PHP client