Fixed selected issue
Fixes to script files