Bugfix for refreshing buttons