fix bug with empty sets
still fix
Merge branch 'feature-fixMax' into develop