This is weird. Why don't you initialise `at = 0` here?