minor bug fix & added main popup