remove bugs of encounting empty Photo data