fix epoch bug
fix when need_patch()