Fixing typo and Rubocop errors