Fix history logging with plugins