fixed crash of publishing without photo. moved clear shared preferences to settings