fix cache dir and minor fix