Only show buttons under certain conditions