Added memory check and maximum group size for fornav operations to save memory.