Hide buttons when not needed.