Fix #11 and modify cache