add entry-not-found testcase
fixed substr bug