Added a rules button with detection