Fixed crash when clicking "Choose Photo" and clicked elsewhere