CodeClimate fix

This change removes duplicated behaviors to satisfy CodeClimate.