Fix limit checking