Fixing bug and typo