bug and documents fixed