finally got popup behavior fixed