fixed reactivity problem with setState