Fix selectedFiles when coming from commandline