disable button appropriately