fixes in client lib and test page