Variable undefined. Only triggered on manual browser navigation.