Doc updated and bug fixed