fixing limits to be the proper number