Fixed bug when clicking edit and no profile is selected