fix cache() error in libraries