buttons not refreshed properly