Fixed issue with next prev buttons