Fix RuboCop offenses
Fix deprecation in