fix verify code exception when no code stored in cache