hopefully fixed nil issue for new files