Fix limit checking error