fix bug in carrousel for newer version of ruby