html reference not updated