Fix the Error for removing  Empty Array