Fix tests and update doc