Update select.js

Fixed a few undefined errors for variables that dont exist