Fixing bug and docs