Fixed two Syntax Errors in search.js

Fixed two Syntax Errors in search.js and left comments of what I did to
fix them.