Store handles selector to fix javascript undefined error