Fixed nullpointer exception in PictureController