update <title> on state change