fixed issues due to upgrade to ruby 2.x and new respond_to? behaviour