Added multiple flag support.