Fix errors in rotation.
Fix undefined variable error in js.
Fix IP address migration.

File was missed from fcd5935bc0cdd012bb015d416153ebebbda50c05.