Updated with method to check for currently showing dialog

and added methods to set tag as msg