Fixed issues with visit updates: variables undefined