Ok, so what I did for this is put a check in place to make sure the limit statement can never contain a negative value.