fixed bug that caused the script to always run in selective mode