Apply stack approach for flushing mechanism on viewer