fix image reloading from innerHTML assignment