Improved the functions for selecting all options.