Minor improvement to set