fix layout + popup issues