bugfix in rest client.