Update auto.js

Fixed one curly brace.
Removed semicolon and comparison warnings.