WP-3862 Added code to handle removing selected items