Added proper actions on both buttons