Several fixes in common-js server.