Fixed Nullpointer exception caused when accessing firsth element of PhotoList