Fix limit check in tests