Fix deleting group when a picture is in that group