hot fix bug in safe_photo