Fix nil exception on photos modal.