fix a bug where integration is cached wrongly