fixed bug : exception on main controller

fixed bug where exception was fired because of undefined selectedFile
and selectedProject.