fix repeated button clicks