Refresh function fix for non-infinite carousels