disable selection for directories
fix popup parameter handling (fix #1)