bugfix and add test for remove and re-add state
test fetch with deps