Trying to get state for buttons working