fix bugs in pictures_edit