Re-add deleted code for global flag button

This fixes #10.