Added set and clear functions for the flags