fixed bug in pictures_controller