second opening crashes bug fixed