Fix buttons not working correctly