rm cache and fix buffer error