Doc and bug fixed