fix cache behaviour