fixing issue when you had duplicated buttons