minor bug fixes
rubocop fixes