fixed some errors caught by rubocop