fix bug in picturesgallerybundle